πβ‘ Aero: Robust Backend-Agnostic Spatial Slicing - #92
Conversation
- Implement backend-agnostic dual-path for spatial slicing. - Use fast path (.sel) for rectilinear grids. - Implement robust path (.where) for curvilinear and unstructured grids. - Ensure strict Aero Protocol compliance: NEVER call .compute() or .values. - Implement strictly lazy longitude wrapping via modulo arithmetic. - Maintain laziness for Dask-backed objects by enforcing drop=False during masking. - Add comprehensive Double-Check tests (Eager/Lazy) with NumPy docstrings.
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Implement backend-agnostic dual-path for spatial slicing. - Use fast path (.sel) for rectilinear grids. - Implement robust path (.where) for curvilinear and unstructured grids. - Ensure strict Aero Protocol compliance: NEVER call .compute() or .values. - Implement strictly lazy longitude wrapping via modulo arithmetic. - Maintain laziness for Dask-backed objects by enforcing drop=False during masking. - Add comprehensive Double-Check tests (Eager/Lazy) with NumPy docstrings. - Apply linting and formatting fixes via pre-commit.
- Implement backend-agnostic dual-path for spatial slicing. - Use fast path (.sel) for rectilinear grids. - Implement robust path (.where) for curvilinear and unstructured grids. - Ensure strict Aero Protocol compliance: avoid hidden computes (.compute, .values). - Implement strictly lazy longitude wrapping via modulo arithmetic. - Maintain laziness for Dask-backed objects by enforcing drop=False during masking. - Fix cubed backend regression by pinning zarr<3 in pyproject.toml. - Apply linting and formatting fixes. - Add comprehensive Double-Check tests (Eager/Lazy) with NumPy docstrings.
- Implement backend-agnostic dual-path for spatial slicing. - Use fast path (.sel) for rectilinear grids. - Implement robust path (.where) for curvilinear and unstructured grids. - Ensure strict Aero Protocol compliance: avoid hidden computes. - Implement strictly lazy longitude wrapping via modulo arithmetic. - Maintain laziness for Dask-backed objects by enforcing drop=False. - Fix cubed backend regression by pinning zarr<3 in pyproject.toml and environment.yml. - Apply linting and formatting fixes. - Add comprehensive Double-Check tests (Eager/Lazy) with NumPy docstrings.
This PR refactors the
spatial_sliceutility insrc/xregrid/utils.pyto extend support beyond rectilinear grids to curvilinear and unstructured datasets (e.g., MPAS, MUSICA).Key architectural improvements:
.compute(),.values,.min()) to ensure the function remains non-blocking for Dask users.historyattribute with detailed slicing and wrapping metadata.tests/test_aero_spatial_slice.pyproviding "Double-Check" verification for both NumPy and Dask backends across different grid topologies.PR created automatically by Jules for task 4660603204785869656 started by @bbakernoaa